﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WebCrawler.HtmlParser.Interfaces;
using WebCrawler.Graph.Interfaces;

namespace WebCrawler.Graph
{
    public class Vertex : IVertex
    {
        public string Name { get; private set; }
        public string Url { get; set; }
        public bool Marked { get; set; }
        public List<Edge> Edges { get; set; }
        public IHtmlDoc Document { get; set; }
        public int level { get; set; }
        public bool Dubplicated { get; set; }

        public Vertex() { }
        public Vertex(IHtmlDoc page)
        {
            this.Document = page;
            this.Url = Document.Url;
            Edges = new List<Edge>();
            level = 1;
        }

        public Vertex(string name)
        {
            this.Name = name;
            Url = name;
            Edges = new List<Edge>();
            level = 1;
        }

        public int OutDegree()
        {
            return 0; // ??
        }
    }
}
